package com.syh.companyservice.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.syh.companyservice.pojo.Companies;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author syh 86187
 * @date 2024/7/1
 * com.syh.bishe.mapper
 * @description
 */
@Mapper
public interface CompaniesMapper extends BaseMapper<Companies> {
    @Select("select id from companies where name=#{name}")
    Integer getId(String name);
    @Select("select * from companies where id=#{id}")
    Companies getCompany(Integer id);
    @Select("select count(*) from companies where name = #{company}")
    Integer check(String company);
}
